This invention relates to a method and apparatus for storing and accessing electronic content. The invention is particularly although not exclusively concerned with a content store for use in generating websites.
By content is meant any information or goods that are delivered electronically to a consumer, either directly or indirectly. For example, content may be embodied in HTML pages and their associated images, and delivered directly to users through the World Wide Web. However, the advent of more general business (electronic business) applications has led to a corresponding generalisation in the definition of content to include, for example:
Web pages and images.
Multimedia files (e.g. audio and video clips).
Streaming media.
Shopping catalogues.
xe2x80x9cSoftxe2x80x9d or xe2x80x9cdigitalxe2x80x9d goods for sale (e.g. downloadable music and software).
Functionality, as embodied in CGI scripts and their modern equivalents.
Such content is generally held in some form of content store. For example, in a conventional website, the content store may be an ordinary filestore containing prepared HTML pages. Alternatively, in a dynamic website, the content store may be a relational database holding raw data, and publishing may use some dynamic page construction mechanism such as CGI or ASP, or a template rendering mechanism, to construct web pages when required.
Such content store may be required to be updated frequently, for example by modifying pages, adding new pages, and deleting old pages in a website. This presents a significant problem in managing the information. The object of the present invention is to provide a novel way of addressing this problem.
According to the invention, a method for storing and accessing objects in an electronic content store comprises:
(a) assigning each object a version number, such that multiple instances of the same object with different version numbers may coexist;
(b) when accessing an object in the content store for reading or writing, specifying a requested version number;
(c) when reading an object, if an instance of that object with the requested version number exists in the content store, returning that instance of the object, and otherwise returning the most recent older instance of that object; and
(d) when writing to an object, if an instance of that object with the requested version number exists in the content store, performing the write to that instance of the object, and otherwise making a copy of the most recent older instance of the object, assigning the requested version number to the copy, and performing the write to the copy.
It will be shown that this provides an efficient and convenient mechanism for managing versions of the content.